﻿@model HRMS_Model.User

@{
    ViewBag.Title = "AddUser";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@using (Html.BeginForm())
{
    <div style="margin-top:5px; margin-bottom:5px">
        <div class="mainDiv">
            <div class="subDiv">
                @Html.LabelFor(model => model.UserName)</div>
            <div class="subDiv">
                @Html.TextBoxFor(model => model.UserName)
                @Html.ValidationMessageFor(model => model.UserName)</div>
        </div>
        <div class="mainDiv">
            <div class="subDiv">
                @Html.LabelFor(model => model.Password)</div>
            <div class="subDiv">
                @Html.PasswordFor(model => model.Password)
                 @Html.ValidationMessageFor(model => model.Password)</div>
        </div>
        <div>
        <div class="mainDiv">
            <div class="subDiv">
                @Html.LabelFor(model => model.Role)</div>
            <div class="subDiv">
                @Html.DropDownListFor(model => model.RoleId, new SelectList(Model.UsrRoles, "RoleId", "RoleType"), "-Select Roles-")
                 @Html.ValidationMessageFor(model => model.RoleId)</div>
        </div>
        <div class="subDiv">
                @Html.LabelFor(model => model.Active)</div>
            <div class="subDiv">
                @Html.DropDownListFor(model => model.Active, new[]
                                                              {
                                                                  new SelectListItem{Text="-Select-", Value ="Select"},
                                                                  new SelectListItem{Text ="True", Value ="True"},
                                                                  new SelectListItem{Text="False", Value ="False"}
                                                              })
                @Html.ValidationMessageFor(model => model.Active)</div>
        </div>
        </div>
     <div style="text-align: center;">
        <input type="submit" style="margin-top: 15px;" value="Add" /></div>
}
    
    
